[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
GETENV(SEXP) (STRING)
Function
Access the value of an environment variable.
Syntax
GETENV(name)
name = A string expression with the name of the environment variable to
access.
Return Type & Value
STRING
Returns the value of the environment variable specified by name.
Remarks
This function allows you to access the value of any environment
variable set at the time that PCBoard was started. So, for example, the
PATH environment variable could be used to access data files somewhere
on the path.
Examples
STRING path
LET path = GETENV("PATH")
TOKENIZE path
LET path = "DATAFILE.TXT"
WHILE (!EXIST(path) & (TOKCOUNT() > 0)) DO
LET PATH = GETTOKEN()+"DATAFILE.TXT"
ENDWHILE
IF (EXIST(path)) PRINTLN "Found ",path,"!"
See Also:
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson